package com.knowif.enumInfo;

//用户角色枚举
public enum UserShareEnum {
	
	//管理员
	SUCCESS(1),
	//普通用户
	DELETE(2),
	//导师
	ERROR(3);
	
	private int number;
	
	private UserShareEnum(int number) {
		this.number = number;
	}

	public int getNumber() {
		return number;
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断是否是管理者
	 * @param number
	 * @return
	 */
	public static boolean isSuccess(int number){
		if(number == SUCCESS.number){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断是否是普通用户
	 * @param number
	 * @return
	 */
	public static boolean isError(int number){
		if(number == ERROR.number){
			return true;
		}else{
			return false;
		}
	}
	
	/**
	 * @author: xingyao 
	 * @Description:  判断是否是导师
	 * @param number
	 * @return
	 */
	public static boolean isDelete(int number){
		if(number == DELETE.number){
			return true;
		}else{
			return false;
		}
	}

}
